package ratonTalk;

import java.util.Calendar;

/**
 * @author ：Dsi
 * @date ：2021/11/18 20:29
 * Describe ：该类用于练习设置时间
 */
public class DateDemo02 {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();
        c.set(Calendar.YEAR, 2008);
        c.set(Calendar.MONTH, Calendar.AUGUST);
        c.set(Calendar.DAY_OF_MONTH, 8);
        c.set(Calendar.HOUR, 20);
        c.set(Calendar.MINUTE, 8);
        c.set(Calendar.SECOND, 8);
        System.out.println(c.getTime());
        c.add(Calendar.YEAR, 3);
        c.add(Calendar.DAY_OF_YEAR,23);
        System.out.println(c.getTime());
    }
}
